//
//  SEGOpenDoorBussinessManager.h
//  SEGUhomeIntelligentHardware
//
//  Created by Clavis on 2018/12/5.
//  Copyright © 2018 刘山. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SEGNewMyDoorListModel.h"
#import "SEGNewOpenDoorModel.h"

NS_ASSUME_NONNULL_BEGIN

// 管理开门逻辑业务的Manager
@interface SEGOpenDoorBussinessManager : NSObject

// 开门成功回调，用于门禁SEGDoorBaseController dismiss
@property (nonatomic, copy) void(^openSuccessBlock)(void);

+ (instancetype)shareInstance;


/**
 开门

 @param doorModel 门禁模型
 @param completeCallback 开门成功回调
 @param openDoorFailCallback 开门失败回调
 */
- (void)openDoorWithDoorModel:(SEGNewMyDoorListModel *)doorModel openDoorSuccessCallback:(void(^)(SEGNewOpenDoorModel* data))completeCallback openDoorFailCallback:(void(^)(SEGNewOpenDoorModel* data))openDoorFailCallback;


/**
 开门

 @param doorModel 门禁模型
 @param completeCallback 开门成功回调
 */
- (void)openDoorWithDoorModel:(SEGNewMyDoorListModel *)doorModel completeCallback:(void(^)(SEGNewOpenDoorModel* data))completeCallback;


/// 显示打开蓝牙的提示
/// @param state 当前蓝牙状态
+ (void)showOpenBluetoothAlterWithBluetoothState:(CBPeripheralManagerState)state;

@end

NS_ASSUME_NONNULL_END
